package org.beholder;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: ddreval
 * Date: 19.10.12
 * Time: 19:39
 * To change this template use File | Settings | File Templates.
 */
public class CheckServlet extends AbstractServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        Map settings = getSettings();
        String state = (String)settings.get(STATE_PARAM);
        //resp.getOutputStream().write(state.getBytes());
        resp.getOutputStream().write(1);
        resp.setStatus(HttpServletResponse.SC_OK);
        resp.flushBuffer();
        closeResources();
    }

}
